package com.smart.common.baomidou;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import java.io.Serializable;

/**
 * 公用的Common类，此处更改设置Id为UUID的形式
 *
 * @author Arnold.zhao <a href="mailto:13949123615@163.com"/>
 * @create 2018-09-23 22:48
 */
public class SuperEntity extends Model implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type=IdType.UUID)
    private String id;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
